package com.sky.mapper;

import com.sky.entity.Employee;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EmployeeMapper {

    /**
     * 根据用户名查询员工
     * @param
     * @return
     */
    @Select("select * from user where userid = #{userid}")
    Employee getByUserid(String userid);
    //根据id查询用户。
    @Select("select * from user where id= #{id}")
    Employee getbyid(Long id);
    //学生用户资料修改.
    void update(Employee employee);

    @Insert("insert into user (id, userid, name, phone)" +"values"+"(#{id},#{userid},#{name},#{phone})")
    void insert(Employee employee);
}
